<?php 

$sub_cid = substr($categoryid, 0,1);
$sider_list = null;

if($sub_cid == '1')
{
	$sider_list = array(
			array('name' => '耐磨铸件', 'forward' => HOST_URL.'/pd-list.php?cid=1001'),
			array('name' => '双金属耐磨材料', 'forward' => HOST_URL.'/pd-list.php?cid=1002'),
			array('name' => '通用工程铸锻件', 'forward' => HOST_URL.'/pd-list.php?cid=1003'),
			array('name' => '钢材贸易', 'forward' => HOST_URL.'/pd-list.php?cid=1004'));
}
else if($sub_cid == '2')
{
	$sider_list =  array(
			array('name' => '通用汽油机', 'forward' => HOST_URL.'/pd-list.php?cid=2001','sub_category'=>array(
					array('name' => '园林机械系列', 'forward' => HOST_URL.'/pd-list.php?cid=20011'),
					array('name' => '发电机系列', 'forward' => HOST_URL.'/pd-list.php?cid=20012'),
					array('name' => '电动水泵系列', 'forward' => HOST_URL.'/pd-list.php?cid=20013'))),
			array('name' => '电动助力自行车', 'forward' => HOST_URL.'/pd-list.php?cid=2002'),
			array('name' => '传动轴', 'forward' => HOST_URL.'/pd-list.php?cid=2003'),
			array('name' => '建筑材料', 'forward' => HOST_URL.'/pd-list.php?cid=2004'));

}
?>
<div id="content-right">
	<div class="side-box">
		<div class="widgets">
			<h3>产品类别</h3>
			<ul>
				<?php 
				if(isset($sider_list) && count($sider_list)>0)
				{
					while((list($key,$item)=each($sider_list)))
					{
						?>
				<li><a href="<?php echo $item['forward']?>"><?php echo $item['name']?>
				</a> <?php 

				if(isset($item['sub_category']))
				{
					$sub_items = $item['sub_category'];
					while((list($key,$sub_item)=each($sub_items)))
					{
						echo '<ul style="margin-top:15px;">';
						?>
				<li style="PADDING-BOTTOM:2px;"><a href="<?php echo $sub_item['forward']?>"><?php echo $sub_item['name']?>
				</a>
				</li>
				<?php
				echo '</ul>';
					}
				}

				?>
				</li>
				<?php
					}
				}
				?>
			</ul>
		</div>
	</div>
</div>
